import request from '@/utils/request'

// 查询员工考勤表列表
export function listTimesheets(query) {
  return request({
    url: '/timesheets/timesheets/list',
    method: 'get',
    params: query
  })
}

// 查询员工考勤表详细
export function getTimesheets(id) {
  return request({
    url: '/timesheets/timesheets/' + id,
    method: 'get'
  })
}

// 新增员工考勤表
export function addTimesheets(data) {
  return request({
    url: '/timesheets/timesheets',
    method: 'post',
    data: data
  })
}
export function addAttendance() {
  return request({
    url: '/timesheets/timesheets/addAttendance',
    method: 'post',
  })
}

// 修改员工考勤表
export function updateTimesheets(data) {
  return request({
    url: '/timesheets/timesheets',
    method: 'put',
    data: data
  })
}

// 删除员工考勤表
export function delTimesheets(id) {
  return request({
    url: '/timesheets/timesheets/' + id,
    method: 'delete'
  })
}
